﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/QuizAdmin.Master" AutoEventWireup="true" CodeBehind="EditPosition.aspx.cs" Inherits="BladeTecWebApplication.Admin.EditPosition" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<script type="text/javascript">
    $(function () {
        // Datepicker
        $('#datepicker').datepicker({
            inline: true
        });
        $('#datepicker').datepicker("setDate", $('#MainContent_hireDate0').val());
    });

    function submitAddPosition() {
    	if (Page_ClientValidate()) {
    		$("#divRequired").hide();
    	} else {
    		$("#divRequired").show();
    	}
        $("#MainContent_hireDate").val($("#datepicker").val());
    }
</script>
    <span class="pageTitle">Edit Position</span>
    <br />
    <br />
    <asp:Panel ID="pnlPositionForm" runat="server">
		<div style="color: Red; display:none" id="divRequired">
		* Required<br /><br />
		</div>
        <table cellpadding="0" cellspacing="0" border="0">
            <tr>
                <td>
                    Position Title:<asp:RequiredFieldValidator ID="rf_title" runat="server"
						ErrorMessage="*" ControlToValidate="txtPositionTitle" ForeColor="Red"></asp:RequiredFieldValidator>
                </td>
                <td style="width:10px;">
				&nbsp;
				</td>
                <td>
                    <asp:TextBox runat="server" ID="txtPositionTitle" CssClass="stdTextBox" Width="250px" />
                </td>
            </tr>
            <tr>
                <td colspan="3" style="height:5px;">
                    &nbsp;</td>
            </tr>
            <tr>
                <td>
                    Quiz:<asp:RequiredFieldValidator ID="rf_quiz" runat="server"
						ErrorMessage="*" ControlToValidate="ddlQuiz" ForeColor="Red"></asp:RequiredFieldValidator>
                </td>
                <td style="width:10px;">
				&nbsp;
				</td>
                <td>
                    <asp:DropDownList ID="ddlQuiz" runat="server">
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td colspan="3" style="height:5px;">
                    &nbsp;</td>
            </tr>
            <tr>
                <td valign="top">
                    Desired Hire Date:
				</td>
                <td style="width:10px;">
				&nbsp;
				</td>
                <td>
                    <div id="datepicker">
                    </div>
                    <br />
                    <asp:HiddenField ID="hireDate"
						runat="server" />
                    <asp:HiddenField ID="hfpositionID" runat="server" />
                    <asp:HiddenField ID="hireDate0" runat="server" />
                </td>
            </tr>
            <tr>
                <td colspan="3" style="text-align:right; border-top: 1px solid #666;">
                    <br />
                    <asp:Button ID="btnSavePosition" runat="server" Text="Save" 
						onclientclick="submitAddPosition();" onclick="btnAddPosition_Click"/>
                </td>
            </tr>
        </table>
    </asp:Panel>
    <asp:Panel ID="pnlConfirmationForm" runat="server" Visible="false">
	
		The position 
        <asp:Label runat="server" ID="lblTitle" Font-Bold="true"></asp:Label>
        for hire on 
        <asp:Label ID="lblHireDate" runat="server" Font-Bold="true"></asp:Label>
        has been edited.
		<br /><br />
		<a href="Position.aspx" class="dashboardLink">View Positions</a>
    </asp:Panel>
</asp:Content>
